package org.example.testapp.pages;

import java.util.Date;

import org.apache.tapestry.Asset;
import org.apache.tapestry.annotations.Path;
import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.ioc.annotations.Inject;
import org.slf4j.Logger;

public class Start {

	@Persist("flash")
	private String text1;
	@Persist("flash")
	private String text2;

	@Inject
	@Path("classpath:/org/example/testapp/fckeditor/myConfig.js")
	private Asset myConfig;
	
	@Inject
	private Logger log;
	
	public Date getDate() {
		return new Date();
	}
	
	public void onSuccess() {
		log.info(String.format("text1: '%s' - text2: '%s'", text1, text2));
	}
	
	public Asset getMyConfig() {
		return myConfig;
	}

	public String getText1() {
		return text1;
	}

	public void setText1(String text1) {
		this.text1 = text1;
	}

	public String getText2() {
		return text2;
	}

	public void setText2(String text2) {
		this.text2 = text2;
	}
}
